package com.ms.demo.annotation;

import org.springframework.stereotype.Component;

/**
 * @description: 执行计算的业务 （目标对象）
 * @author: ms
 * @create: 2022-08-29 14:07
 */
@Component
public class CalculateImpl implements Calculate{

    public int add(int a, int b){
        int result = a + b;
        System.out.println("正在执行add 加方法...");
        return result;
    }

    public int sub(int a, int b){
        int result = a - b;
        System.out.println("正在执行sub 减方法...");
        return result;
    }

    public int mul(int a, int b){
        int result = a * b;
        System.out.println("正在执行mul 乘方法...");
        return result;
    }

    public int div(int a, int b){
        int result = a / b;
        System.out.println("正在执行div 除方法...");
        return result;
    }
}